Skip to content

Conversation

@chikamura
Copy link
Contributor

@chikamura chikamura commented Sep 29, 2024

bug fix: if a non-ascii schema name is specified, an embulk run fails.

Change from an implementation that retrieves all cases by specifying null for database in tableIdentifier, the argument of getTables and getColumns, and filters the results with isAvailableTableMetadataInConnection to an implementation that sets connection default value for database in tableIdentifier.

See also:

public TableIdentifier currentConnectionTableIdentifier(TableIdentifier tableIdentifier) {
// Caution:
// JdbcOutputPlugin sometimes uses tableIdentifier whose database variable is null,
// which causes unexpected DatabaseMetaData behavior in AbstractJdbcOutputPlugin.
// For example, getTables and getColumns search in all catalogs,
// not just the one specified by the connection's default value,
// and can't search in schemas with multibyte name.
// So, if tableIdentifier database variable is null, it will set the connection's default value.

@chikamura chikamura self-assigned this Sep 29, 2024
@chikamura chikamura changed the title Fix DetabaseMetadta behavior for non-ascii schema name Enable execution if non-ascii schema name Sep 29, 2024
@chikamura
Copy link
Contributor Author

Anonther PR also fixes an issue where embulk run fails when a non-ascii schema name is specified. The test code written in this PR was merged into the PR and a refactoring part was made into the separate PR.

@chikamura chikamura closed this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants